package com.huawei.hms.framework.network.restclient.hianalytics;

import com.huawei.hms.framework.common.Utils;
import com.huawei.hms.framework.network.restclient.hianalytics.RequestFinishedInfo.MetricsTime;

public abstract class EditableMetricsTime extends MetricsTime {
    private boolean bRealTime;
    private long callEndTime;
    private long callStartTime;
    private long connectEndTime;
    private long connectStartTime;
    private long connectionAcquiredTime;
    private long connectionReleasedTime;
    private long dnsEndTime;
    private long dnsStartTime;
    private long requestBodyEndTime;
    private long requestBodyStartTime;
    private long requestHeadersEndTime;
    private long requestHeadersStartTime;
    private long responseBodyEndTime;
    private long responseBodyStartTime;
    private long responseHeadersEndTime;
    private long responseHeadersStartTime;
    private long secureConnectEndTime;
    private long secureConnectStartTime;
    protected long ttfb;

    protected EditableMetricsTime(boolean z) {
        this.bRealTime = z;
    }

    protected EditableMetricsTime() {
    }

    public void setCallStartTime() {
        this.callStartTime = getCurrentTime();
    }

    public void setCallStartTime(long j) {
        this.callStartTime = j;
    }

    public void setDnsStartTime() {
        this.dnsStartTime = getCurrentTime();
    }

    public void setDnsStartTime(long j) {
        this.dnsStartTime = j;
    }

    public void setDnsEndTime() {
        this.dnsEndTime = getCurrentTime();
    }

    public void setDnsEndTime(long j) {
        this.dnsEndTime = j;
    }

    public void setConnectStartTime() {
        this.connectStartTime = getCurrentTime();
    }

    public void setConnectStartTime(long j) {
        this.connectStartTime = j;
    }

    public void setSecureConnectStartTime() {
        this.secureConnectStartTime = getCurrentTime();
    }

    public void setSecureConnectStartTime(long j) {
        this.secureConnectStartTime = j;
    }

    public void setSecureConnectEndTime() {
        this.secureConnectEndTime = getCurrentTime();
    }

    public void setSecureConnectEndTime(long j) {
        this.secureConnectEndTime = j;
    }

    public void setConnectEndTime() {
        this.connectEndTime = getCurrentTime();
    }

    public void setConnectEndTime(long j) {
        this.connectEndTime = j;
    }

    public void setConnectionAcquiredTime() {
        this.connectionAcquiredTime = getCurrentTime();
    }

    public void setConnectionAcquiredTime(long j) {
        this.connectionAcquiredTime = j;
    }

    public void setConnectionReleasedTime() {
        this.connectionReleasedTime = getCurrentTime();
    }

    public void setConnectionReleasedTime(long j) {
        this.connectionReleasedTime = j;
    }

    public void setRequestHeadersStartTime() {
        this.requestHeadersStartTime = getCurrentTime();
    }

    public void setRequestHeadersStartTime(long j) {
        this.requestHeadersStartTime = j;
    }

    public void setRequestHeadersEndTime() {
        this.requestHeadersEndTime = getCurrentTime();
    }

    public void setRequestHeadersEndTime(long j) {
        this.requestHeadersEndTime = j;
    }

    public void setRequestBodyStartTime() {
        this.requestBodyStartTime = getCurrentTime();
    }

    public void setRequestBodyStartTime(long j) {
        this.requestBodyStartTime = j;
    }

    public void setRequestBodyEndTime() {
        this.requestBodyEndTime = getCurrentTime();
    }

    public void setRequestBodyEndTime(long j) {
        this.requestBodyEndTime = j;
    }

    public void setResponseHeadersStartTime() {
        this.responseHeadersStartTime = getCurrentTime();
    }

    public void setResponseHeadersStartTime(long j) {
        this.responseHeadersStartTime = j;
    }

    public void setResponseHeadersEndTime() {
        this.responseHeadersEndTime = getCurrentTime();
    }

    public void setResponseHeadersEndTime(long j) {
        this.responseHeadersEndTime = j;
    }

    public void setResponseBodyStartTime() {
        this.responseBodyStartTime = getCurrentTime();
    }

    public void setResponseBodyStartTime(long j) {
        this.responseBodyStartTime = j;
    }

    public void setResponseBodyEndTime() {
        this.responseBodyEndTime = getCurrentTime();
    }

    public void setResponseBodyEndTime(long j) {
        this.responseBodyEndTime = j;
    }

    public void setCallEndTime() {
        this.callEndTime = getCurrentTime();
    }

    public void setCallEndTime(long j) {
        this.callEndTime = j;
    }

    public void setTtfb(long j) {
        this.ttfb = j;
    }

    public long getCallStartTime() {
        return this.callStartTime;
    }

    public long getDnsStartTime() {
        return this.dnsStartTime;
    }

    public long getDnsEndTime() {
        return this.dnsEndTime;
    }

    public long getConnectStartTime() {
        return this.connectStartTime;
    }

    public long getSecureConnectStartTime() {
        return this.secureConnectStartTime;
    }

    public long getSecureConnectEndTime() {
        return this.secureConnectEndTime;
    }

    public long getConnectEndTime() {
        return this.connectEndTime;
    }

    public long getConnectionAcquiredTime() {
        return this.connectionAcquiredTime;
    }

    public long getConnectionReleasedTime() {
        return this.connectionReleasedTime;
    }

    public long getRequestHeadersStartTime() {
        return this.requestHeadersStartTime;
    }

    public long getRequestHeadersEndTime() {
        return this.requestHeadersEndTime;
    }

    public long getRequestBodyStartTime() {
        return this.requestBodyStartTime;
    }

    public long getRequestBodyEndTime() {
        return this.requestBodyEndTime;
    }

    public long getResponseHeadersStartTime() {
        return this.responseHeadersStartTime;
    }

    public long getResponseHeadersEndTime() {
        return this.responseHeadersEndTime;
    }

    public long getResponseBodyStartTime() {
        return this.responseBodyStartTime;
    }

    public long getResponseBodyEndTime() {
        return this.responseBodyEndTime;
    }

    public long getCallEndTime() {
        return this.callEndTime;
    }

    public long getAndCheckEndTime(long j, long j2) {
        if (j == 0 || j2 != 0) {
            return j2;
        }
        return Utils.getCurrentTime(this.bRealTime);
    }

    public long getCurrentTime() {
        return Utils.getCurrentTime(this.bRealTime);
    }
}
